import request from '@/utils/request'
import type { LoginForm, LoginVO, Result } from '@/types'

/**
 * 用户登录
 */
export function login(data: LoginForm) {
  return request<LoginVO>({
    url: '/auth/login',
    method: 'post',
    data
  })
}

/**
 * 用户注册
 */
export function register(data: any) {
  return request<void>({
    url: '/auth/register',
    method: 'post',
    data
  })
}

/**
 * 退出登录
 */
export function logout() {
  return request<void>({
    url: '/auth/logout',
    method: 'post'
  })
}

